/**
 * 像素点
 */
export class PixelPoint {
  // 颜色
  r: number
  g: number
  b: number
  a: number

  // 位置
  x: number
  y: number

  constructor(x: number, y: number) {
    this.x = x
    this.y = y
    this.r = this.g = this.b = this.a = 0
  }
}

/** 
 * 渲染任务，记录包含的像素
 */
export class RenderTask {
  pixels: PixelPoint[]
  width: number
  height: number

  constructor(pixels: PixelPoint[], width: number, height: number) {
    this.pixels = pixels
    this.width = width
    this.height = height
  }
}